package cn._51doit.flink.day01.sources;

import org.apache.flink.streaming.api.datastream.DataStreamSource;
import org.apache.flink.streaming.api.environment.LocalStreamEnvironment;
import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment;

import java.util.Arrays;
import java.util.List;

public class CollectionSource2 {

    public static void main(String[] args) throws Exception {

        //创建Local模式模式的执行环境，只能用local模式运行，无法提交到集群中运行
        LocalStreamEnvironment env = StreamExecutionEnvironment.createLocalEnvironment();

        DataStreamSource<Integer> numStream = env.fromElements(1, 2, 3, 4, 5, 6, 7, 8, 9, 10);

        numStream.print();

        env.execute();
    }
}
